package com.hkts.management.unattended.config;

import com.hkts.management.unattended.order.entity.HktsOrderInfo;
import com.hkts.management.unattended.order.service.serviceimpl.HktsOrderInfoServiceImpl;
import com.hkts.management.unattended.order.service.serviceimpl.HktsOrderInfoSlaveServiceImpl;
import com.hkts.management.unattended.poundroom.entity.*;
import com.hkts.management.unattended.poundroom.service.serviceimpl.*;
import com.hkts.management.unattended.weightingInfo.service.serviceimpl.WeightingInfoServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @ClassNameScheduleTask
 * @Description
 * @Author yck
 * @Date2021-05-21 16:39
 * @Version V1.0
 **/
@Configuration
@EnableScheduling
public class ScheduleTask {
    @Autowired
    private SyncPoundRoomUtil syncPoundRoomUtil;

    /**
     * 轮询处理退款失败的记录
     */
    @Scheduled(cron = "0 0/1 * * * ?")
    private void configureTasks() throws Exception {

        System.out.println("=====================同步数据开始========================");
        syncPoundRoomUtil.inventoryclass();
        syncPoundRoomUtil.ybMutualCompanies();
        syncPoundRoomUtil.inventories();
        syncPoundRoomUtil.povouchServiceLast();
        syncPoundRoomUtil.sovouches();
        syncPoundRoomUtil.warehouseLast();

    }

}
